package com.slz3.business.module.goodsManagement.gooBrand.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.goodsManagement.gooBrand.domain.GooBrand;
import com.slz3.business.module.goodsManagement.gooBrand.domain.GooBrandCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;
@Component
public class GooBrandResAtomic {

    public Mono<ServerResponse> add_$GooBrandUpdateLock(ServerRequest req, GooBrand gooBrand) {
        return GooBrandResSafeValid.add(req, gooBrand) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBrandResExecutor.add(req, gooBrand);
    }

    public  Mono<ServerResponse> delete_$GooBrandUpdateLock(ServerRequest req, GooBrandCondition gooBrandCondition) {
        return GooBrandResSafeValid.delete(req, gooBrandCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBrandResExecutor.delete(req);
    }

    public Mono<ServerResponse> modify_$GooBrandUpdateLock(ServerRequest req, GooBrand gooBrand) {
        return GooBrandResSafeValid.modify(req, gooBrand) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBrandResExecutor.modify(req, gooBrand);
    }

    public Mono<ServerResponse> info_$GooBrandUpdateLock(ServerRequest req) {
        return GooBrandResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBrandResExecutor.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$GooBrandUpdateLock(ServerRequest req, GooBrandCondition gooBrandCondition) {
        return GooBrandResSafeValid.auditSubmit(req, gooBrandCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBrandResExecutor.auditSubmit(req);
    }

    public  Mono<ServerResponse> audit_$GooBrandUpdateLock(ServerRequest req, GooBrandCondition gooBrandCondition) {
        return GooBrandResSafeValid.audit(req, gooBrandCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBrandResExecutor.audit(req);
    }

    public  Mono<ServerResponse> auditReject_$GooBrandUpdateLock(ServerRequest req, GooBrandCondition gooBrandCondition) {
        return GooBrandResSafeValid.auditReject(req, gooBrandCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBrandResExecutor.auditReject(req);
    }


    public  Mono<ServerResponse> usingEnable_$GooBrandUpdateLock(ServerRequest req, GooBrandCondition gooBrandCondition) {
        return GooBrandResSafeValid.usingEnable(req, gooBrandCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBrandResExecutor.usingEnable(req);
    }

    public  Mono<ServerResponse> usingDisable_$GooBrandUpdateLock(ServerRequest req, GooBrandCondition gooBrandCondition) {
        return GooBrandResSafeValid.usingDisable(req, gooBrandCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBrandResExecutor.usingDisable(req);
    }
}
